3.266 \(\int \frac {\sec ^3(x)}{a-a \sin ^2(x)} \, dx\)

Optimal. Leaf size=35 \[ \frac {3 \tanh ^{-1}(\sin (x))}{8 a}+\frac {\tan (x) \sec ^3(x)}{4 a}+\frac {3 \tan (x) \sec (x)}{8 a} \]

[Out]

3/8*arctanh(sin(x))/a+3/8*sec(x)*tan(x)/a+1/4*sec(x)^3*tan(x)/a

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {3175, 3768, 3770} \[ \frac {3 \tanh ^{-1}(\sin (x))}{8 a}+\frac {\tan (x) \sec ^3(x)}{4 a}+\frac {3 \tan (x) \sec (x)}{8 a} \]

Antiderivative was successfully verified.

[In]

Int[Sec[x]^3/(a - a*Sin[x]^2),x]

[Out]

(3*ArcTanh[Sin[x]])/(8*a) + (3*Sec[x]*Tan[x])/(8*a) + (Sec[x]^3*Tan[x])/(4*a)

Rule 3175

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[a^p, Int[ActivateTrig[u*cos[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
 1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \frac {\sec ^3(x)}{a-a \sin ^2(x)} \, dx &=\frac {\int \sec ^5(x) \, dx}{a}\\ &=\frac {\sec ^3(x) \tan (x)}{4 a}+\frac {3 \int \sec ^3(x) \, dx}{4 a}\\ &=\frac {3 \sec (x) \tan (x)}{8 a}+\frac {\sec ^3(x) \tan (x)}{4 a}+\frac {3 \int \sec (x) \, dx}{8 a}\\ &=\frac {3 \tanh ^{-1}(\sin (x))}{8 a}+\frac {3 \sec (x) \tan (x)}{8 a}+\frac {\sec ^3(x) \tan (x)}{4 a}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.13, size = 61, normalized size = 1.74 \[ \frac {\frac {1}{2} (11 \sin (x)+3 \sin (3 x)) \sec ^4(x)-6 \log \left (\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right )+6 \log \left (\sin \left (\frac {x}{2}\right )+\cos \left (\frac {x}{2}\right )\right )}{16 a} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[x]^3/(a - a*Sin[x]^2),x]

[Out]

(-6*Log[Cos[x/2] - Sin[x/2]] + 6*Log[Cos[x/2] + Sin[x/2]] + (Sec[x]^4*(11*Sin[x] + 3*Sin[3*x]))/2)/(16*a)

________________________________________________________________________________________

fricas [A]  time = 0.43, size = 46, normalized size = 1.31 \[ \frac {3 \, \cos \relax (x)^{4} \log \left (\sin \relax (x) + 1\right ) - 3 \, \cos \relax (x)^{4} \log \left (-\sin \relax (x) + 1\right ) + 2 \, {\left (3 \, \cos \relax (x)^{2} + 2\right )} \sin \relax (x)}{16 \, a \cos \relax (x)^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^3/(a-a*sin(x)^2),x, algorithm="fricas")

[Out]

1/16*(3*cos(x)^4*log(sin(x) + 1) - 3*cos(x)^4*log(-sin(x) + 1) + 2*(3*cos(x)^2 + 2)*sin(x))/(a*cos(x)^4)

________________________________________________________________________________________

giac [A]  time = 0.12, size = 47, normalized size = 1.34 \[ \frac {3 \, \log \left (\sin \relax (x) + 1\right )}{16 \, a} - \frac {3 \, \log \left (-\sin \relax (x) + 1\right )}{16 \, a} - \frac {3 \, \sin \relax (x)^{3} - 5 \, \sin \relax (x)}{8 \, {\left (\sin \relax (x)^{2} - 1\right )}^{2} a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^3/(a-a*sin(x)^2),x, algorithm="giac")

[Out]

3/16*log(sin(x) + 1)/a - 3/16*log(-sin(x) + 1)/a - 1/8*(3*sin(x)^3 - 5*sin(x))/((sin(x)^2 - 1)^2*a)

________________________________________________________________________________________

maple [B]  time = 0.22, size = 66, normalized size = 1.89 \[ \frac {1}{16 a \left (-1+\sin \relax (x )\right )^{2}}-\frac {3}{16 a \left (-1+\sin \relax (x )\right )}-\frac {3 \ln \left (-1+\sin \relax (x )\right )}{16 a}-\frac {1}{16 a \left (1+\sin \relax (x )\right )^{2}}-\frac {3}{16 a \left (1+\sin \relax (x )\right )}+\frac {3 \ln \left (1+\sin \relax (x )\right )}{16 a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(x)^3/(a-a*sin(x)^2),x)

[Out]

1/16/a/(-1+sin(x))^2-3/16/a/(-1+sin(x))-3/16/a*ln(-1+sin(x))-1/16/a/(1+sin(x))^2-3/16/a/(1+sin(x))+3/16/a*ln(1
+sin(x))

________________________________________________________________________________________

maxima [A]  time = 0.34, size = 51, normalized size = 1.46 \[ -\frac {3 \, \sin \relax (x)^{3} - 5 \, \sin \relax (x)}{8 \, {\left (a \sin \relax (x)^{4} - 2 \, a \sin \relax (x)^{2} + a\right )}} + \frac {3 \, \log \left (\sin \relax (x) + 1\right )}{16 \, a} - \frac {3 \, \log \left (\sin \relax (x) - 1\right )}{16 \, a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^3/(a-a*sin(x)^2),x, algorithm="maxima")

[Out]

-1/8*(3*sin(x)^3 - 5*sin(x))/(a*sin(x)^4 - 2*a*sin(x)^2 + a) + 3/16*log(sin(x) + 1)/a - 3/16*log(sin(x) - 1)/a

________________________________________________________________________________________

mupad [B]  time = 13.88, size = 31, normalized size = 0.89 \[ \frac {3\,\mathrm {atanh}\left (\sin \relax (x)\right )}{8\,a}+\frac {3\,\sin \relax (x)}{8\,a\,{\cos \relax (x)}^2}+\frac {\sin \relax (x)}{4\,a\,{\cos \relax (x)}^4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(x)^3*(a - a*sin(x)^2)),x)

[Out]

(3*atanh(sin(x)))/(8*a) + (3*sin(x))/(8*a*cos(x)^2) + sin(x)/(4*a*cos(x)^4)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ - \frac {\int \frac {\sec ^{3}{\relax (x )}}{\sin ^{2}{\relax (x )} - 1}\, dx}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)**3/(a-a*sin(x)**2),x)

[Out]

-Integral(sec(x)**3/(sin(x)**2 - 1), x)/a

________________________________________________________________________________________